package My.example.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class myaop {
    @Pointcut("execution(* My.example.*.*.out(..))")
    private void pt(){}
    @Around("pt()")
    public Object before(ProceedingJoinPoint point) throws Throwable {

        Signature signature = point.getSignature();
        System.out.println("方法名"+signature.getName());
        System.out.println(signature.getDeclaringType());
        System.out.println("参数"+point.getArgs());

        System.out.println("时间"+System.currentTimeMillis());
        System.out.println("h打赏");
        Object o=point.proceed();

        return o;
    }

}
